<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>纽斯达 NewStar | 首页</title>
<base href="<?=base_url()?>"  />
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/index.css" />
<link rel="stylesheet" href="css/slider.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/placeholder.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/validation/home.js"></script> 
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/autoscroll.js"></script>
<script type="text/javascript" src="js/animation.js"></script>
</head>
<body>
<div id="top-nav">
  <div class="container fn-clear">
    <div class="left text-darkgrey">
      <?php if($uid):?>
      <p>欢迎来到纽斯达！ 您好，<span class="text-yellow"><?=$name?></span>！<a href="home/logout" class="a-yellow">注销登录</a></p>
      <?php else:?>
      <p>欢迎来到纽斯达！ 请<a href="user/login" class="a-yellow">登录</a> <a href="user/register" class="a-yellow">免费注册</a></p>
      <?php endif;?>
    </div>
    <div class="right">
      <p><a href="user" class="a-yellow">会员中心</a>　<a href="help" class="a-yellow">帮助中心</a></p>
    </div>
  </div>
</div>
<div id="top" class="fn-clear">
  <div id="logo">
    <h1><a href="home" title="纽斯达 NewStar"><img src="images/logo.jpg" alt="纽斯达 NewStar" /></a></h1>
  </div>
  <div id="main-search">
    <form action="business/businessList" method="post">
      <input id="search" type="text" name="search" class="input" placeholder="搜索特约商户、商户地址..." />
      <input type="submit" value="搜索" class="button" />
    </form>
  </div>
</div>
<div id="nav" class="fn-clear">
  <ul>
    <li class="nav-item"><a href="home">首页</a></li>
    <li class="nav-item"><a href="news">最新动态</a>
      <ul>
        <li><a href="news/newsList">纽斯达新闻</a></li>
        <li><a href="news/activityList">商户活动</a></li>
        <li><a href="news/cardPostList">卡片公告</a></li>
      </ul>
    </li>
    <li class="nav-item"><a href="about/content/<?=$cardAboutList[0]['id']?>">纽斯达卡</a>
      <ul>
      	<?foreach ($cardAboutList as $row):?>
        <li><a href="about/content/<?=$row['id']?>"><?=$row['name']?></a></li>
        <?endforeach;?>
      </ul>
    </li>
    <li class="nav-item"><a href="business">特约商户</a></li>
    <li class="nav-item"><a href="user">会员中心</a></li>
    <li class="nav-item"><a href="help">帮助中心</a>
      <ul>
        <li><a href="card/balance">卡余额查询</a></li>
        <li><a href="help">常见问题</a></li>
        <li><a href="help/message">用户留言</a></li>
      </ul>
    </li>
    <li class="nav-item"><a href="about/content/<?=$aboutList[0]['id']?>">关于我们</a>
      <ul>
        <?foreach ($aboutList as $row):?>
        <li><a href="about/content/<?=$row['id']?>"><?=$row['name']?></a></li>
        <?endforeach;?>
      </ul>
    </li>
  </ul>
  <div id="check"><a href="check">特约商户网上对账</a></div>
</div>
<div id="main" class="fn-clear">
  <div class="fn-clear">
  <div class="left">
    <div id="activity-slider">
      <ul class="bjqs">
      	<?php foreach ($slider as $row):?>
		<?php if($row['class']=='A'):?>
		<li><a href="news/activityContent/<?=$row['id']?>"><img src="<?=$row['newsImage']?>" /></a></li>
		<?php elseif($row['class']=='N'):?>
		<li><a href="news/newsContent/<?=$row['id']?>"><img src="<?=$row['newsImage']?>" /></a></li>
		<?php elseif($row['class']=='C'):?>
		<li><a href="news/cardPostContent/<?=$row['id']?>"><img src="<?=$row['newsImage']?>" /></a></li>
		<?php endif;?>
		<?php endforeach;?>
      </ul>
    </div>
    <div id="notice">
      <h2>卡片公告</h2>
      <div id="notice-slider">
        <ul>
	        <?php foreach ($cardPost as $row):?>
			<li><p><a href="news/cardPostContent/<?=$row['id']?>"><?=cutstr($row['title'], 40)?></a></p></li>
			<?php endforeach;?>
        </ul>
        <a id="down"><</a><a id="up">></a><a href="news/cardPostList" class="more">更多</a>
      </div>
    </div>
    <div id="business">
      <h2>商户导航</h2>
      <div class="content">
      <span>分类：</span>
      <ul class="fn-clear">
	  <?php foreach ($class1 as $row):?>
		<li><a href="business/businessList/<?=$row['id']?>" class="a-yellow"><?=$row['name']?></a></li>
		<?php foreach ($class2 as $row2):
			if($row2['class1']==$row['id']):?>
			<li><a href="business/businessList/<?=$row2['class1']?>/<?=$row2['id']?>"><?=$row2['name']?></a></li>
		<?php endif;
			endforeach;?>
	  <?php endforeach;?>
	  </ul>
	  <span>商区：</span>
	  <ul class="short fn-clear">
	  <?php for ($i = 0; $i < 10; $i++):?>
		<li><a href="business/businessList/0/0/<?=$area[$i]['region']?>/<?=$area[$i]['id']?>"><?=$area[$i]['name']?></a></li>
	  <?php endfor;?>
	    <li><a href="business" class="a-yellow">更多>></a></li>
	  </ul>
	  <span>地区：</span>
	  <ul class="short">
	  <?php for ($i = 0; $i < 10; $i++):?>
		<li><a href="business/businessList/0/0/<?=$region[$i]['id']?>"><?=$region[$i]['name']?></a></li>
	  <?php endfor;?>
	    <li><a href="business" class="a-yellow">更多>></a></li>
	  </ul>
	</div>
    </div>
    <div id="activity">
      <h2>缤纷活动</h2>
      <div class="content">
      <div class="act-left">
      <ul>
      <?php foreach ($actShow as $row):?>
      <li><a href="news/activityContent/<?=$row['id']?>"><img src="<?=$row['newsImage']?>" /></a></li>
	  <?php endforeach;?>
	  </ul>
	  </div>
	  <div class="act-right">
	  <ul>
	  <?php foreach ($activity as $row):?>
	  <li><a href="news/activityContent/<?=$row['id']?>"><?=cutstr($row['title'],12)?></a></li>
	  <?php endforeach;?>
	  </ul>
	  </div>
      </div>
    </div>
  </div>
  <div class="right">
    <div id="login">
      <h2>会员登录</h2>
      <div class="content">
        <?php if($uid):?>
        <div class="margin">
        <p class="text-darkgrey">欢迎使用纽斯达卡！您好，<span class="text-yellow"><?=$name?></span>！</p>
        <p class="text-darkgrey">您可以进行以下操作</p>
		<p><input type="button" value="进入会员中心" onclick="location.href=getRootPath()+'/user/center'" class="button" /></p>
		<p><input type="button" value="注销登录" class="button" onclick="location.href=getRootPath()+'/home/logout'" /></p>
		</div>
		<?php else:?>
		<?=form_open('user/login',$form1)?>
          <label id="msg" class="hint"></label>
          <p>邮　箱：
            <input id="email" type="text" name="email"   />
          </p>
          <p>密　码：
            <input id="password" type="password" name="password"  />
          </p>
          <p>验证码：
            <input type="text" id="test" name="test" class="short-input" />
            <span id="capImg"><?= $img ?></span> <a id="resetCap" href="javascript:;">换一张</a></p>
          <p class="margin">
            <input type="submit" id="submitCheck" value="登录" class="login" />
            <a href="user/forget">忘记密码</a></p>
        </form>
        <div id="register">
          <input type="button" value="新会员注册" onclick="location.href=getRootPath().replace('/home','')+'/user/register'" />
        </div>
		<?php endif;?>
      </div>
    </div>
    <div id="news">
      <h2>纽斯达新闻</h2>
      <div class="content">
        <ul>
        <?php foreach ($news as $row):?>
		<li><a href="news/newsContent/<?=$row['id']?>"><?=cutstr($row['title'],14)?></a></li>
	    <?php endforeach;?>
	    </ul>
	    <a href="news" class="more">更多</a>
      </div>
    </div>
    <div id="join">
      <h2>特约商户加盟</h2>
      <a href="message/business"><img src="images/business-join.jpg" alt="特约商户加盟" /></a></div>
  </div>
  </div>
  <div id="hot-business" class="fn-clear">
    <h2>热门加盟店</h2>
    <ul class="fn-clear">
	  <?php foreach ($business as $row):?>
		<li><a href="business/businessList/0_<?=$row['groupName']?>/0/0/0"><img src="<?=$row['logoImage']?>" /></a></li>
	  <?php endforeach;?>
    </ul>
  </div>
  <div id="link" class="fn-clear">
    <h2>商户交换链接</h2>
    <ul class="fn-clear">
	  <?php foreach ($link as $row):?>
		<li><a href="<?=$row['link']?>" target="_blank"><?=$row['name']?></a></li>
	  <?php endforeach;?>
    </ul>
  </div>
</div>
</div>
<div id="bottom">
  <div class="fn-clear">
  <div id="bottom-nav">
    <ul>
      <li><img src="images/about-card-title.jpg" alt="关于卡片" />
        <ul>
          <li><a href="about/content/1">卡片介绍</a></li>
          <li><a href="about/content/3">持卡人须知</a></li>
          <li><a href="about/content/5">注意事项</a></li>
        </ul>
      </li>
      <li><img src="images/cooperation-title.jpg" alt="联系合作" />
        <ul>
          <li><a href="message/business">特约商户加盟</a></li>
        </ul>
      </li>
      <li><img src="images/help-title.jpg" alt="帮助中心" />
        <ul>
          <li><a href="card/balance">卡余额查询</a></li>
          <li><a href="help">常见问题</a></li>
          <li><a href="help/message">用户留言</a></li>
        </ul>
      </li>
      <li><img src="images/contact-title.jpg" alt="联系我们" />
        <ul>
          <li><a href="mailto:nsdkj@nsdkj.com.cn">联系邮箱</a></li>
        </ul>
      </li>
    </ul>
  </div>
  <div id="lisence"><a href="news/newsContent/35"><img src="images/lisence.jpg" /></a></div>
  <div id="contact-info">
    <p>热线电话：021-63831111　联系地址：上海市伊犁南路111号钱江商务广场1601室A座</p>
  </div>
  <link rel="stylesheet" href="css/dialog.css" />	
  <script type="text/javascript" src="js/dialog.js"></script>
  <script type="text/javascript">
  $(function(){
  	  // Dialog			
  	  $('#nsdmap').dialog({
  		  autoOpen: false,
		  modal: true,
		  width: 500,
		  height: 500
	  });
	  // Dialog Link
	  $('#contact-info').click(function(){
		  $('#nsdmap').dialog('open');
		  return false;
	  });
  });
  </script>
  <div id="nsdmap" title="纽斯达位置地图">
  <p style="text-align:center;"><img src="http://api.go2map.com/engine/api/static/image+{'points':'上海市伊犁南路111号钱江商务广场1601室A座','width':450,'height':450,'zoom':15,'center':'上海市伊犁南路111号钱江商务广场1601室A座','city':'上海'}.png" /></p>
  </div>
  </div>
  <div id="copyright">
    <p>©2012 上海纽斯达科技有限公司　ICP备案号：<a href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备10026991号</a>　支付业务许可证编号：<a href="http://www.pbc.gov.cn/publish/zhengwugongkai/3580/2011/20111231165250839338547/20111231165250839338547_.html" target="_blank">Z200973100016</a></p>
    <p><a href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120329171456758" target="_blank"><img src="images/gs.gif" style="margin-top:10px;" /></a>　　　<a href="http://sh.cyberpolice.cn/infoCategoryListAction.do?act=initjpg" target="_blank"><img src="images/police.png" style="margin-top:10px;"></a>　　　<a href="http://www.zx110.org" target="_blank"><img src="images/zx_footer_logo.png" style="margin-top:10px;"></a></p>
  </div>
</div>

</body>
</html>